package com.zyy.joseata.advice;

import lombok.extern.slf4j.Slf4j;
import org.springframework.aop.MethodBeforeAdvice;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;

/**
 * @author zhangyy
 */
@Component
@Slf4j
public class BeforeAdvice implements MethodBeforeAdvice {

    @Override
    public void before(Method method, Object[] objects, Object o) throws Throwable {
        // 前置通知的逻辑
        log.info("使用注解方式加强.....前置通知被调用");
    }
}